local skynet = require "skynet"
local mongo = require "mongo"

skynet.start(function()

	print(mongo)

	client = mongo.client{rs={{host="127.0.0.1",port=27017}}}
	print(client)
	local cursor = client.birdgame.account:find()
	print(cursor:hasNext())
	local ret = cursor:next()
	for k, v in pairs(ret) do
		print(k,v)
	end

	local ret2 = client.birdgame.account:findOne({account_name="lida"})
	for k, v in pairs(ret2) do
		print(k, v)
	end

end)
